package com.qf.base.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public  class PatternUtil {
    private static Pattern MOBILE_PATTERN = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");
    private static Pattern EMAIL_PATTERN = Pattern.compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");


    public static boolean isMobileNo(String mobiles){
        Matcher m =MOBILE_PATTERN.matcher(mobiles);
        return m.matches();
    }
    public static boolean isEmailAddr(String email){
        Matcher m = EMAIL_PATTERN.matcher(email);
        return m.matches();
    }



}
